Dynomotion

Group: DynoMotion Message: 4039 From: himykabibble Date: 2/22/2012
Subject: CoordMotion/Interpreter Halt, Abort, etc.
I am trying to exorcise the last few demons out of my controller app. One of the worst has to do with interrupting a G-code program in process. Right now, my Stop button does Interpreter.Halt(). But, this has two problems:

1) I cannot resume execution of the G-code. I can re-load the program, then start up from the line it was stopped on, but if I simply try to resume from the point where it was stopped, without re-loading the program, the interpreter simply hangs. It may, or may not, execute a single line, then just go out to lunch.

2) If I jog while stopped, then execute ANY g-code, including MDI, it will move the jogged axis back to where it was when stopped. This is HIGHLY undesirable.

I am not even a little clear on the "correct" use of Halt() and Abort() in CoordMotion and Interpreter, nor *exactly* what they do. I've tried to make sense out of the code in KMotionCNC, but it is doing things I simply don't understand, and manipulating things in the Interpreter that don't appear to me to exist in dotNet. I and cleating both Halt and Abort whenever I try to execute G-code, but that doesn't seem to help. So far, the only way I've been able to get it to work reasonably well is to do Interpreter.Initialize() after the Halt(). But, again, I have no clue exactly what this is doing.

Regards,
Ray L.
Group: DynoMotion Message: 4050 From: Tom Kerekes Date: 2/22/2012
Subject: Re: CoordMotion/Interpreter Halt, Abort, etc.
Hi Ray,
 
Sorry I don't have a simple answer.  As I've said before Halt/Resume is some of the most complex code in KMotion.  All I can suggest is to copy the techniques of KMotionCNC as much as possible - if you deviate you are on your own :}
 
There is a function called:
 
// check if we should move back to where we stopped
int
CKMotionCNCDlg::CheckForResumeCircumstances()
 
As part of the KMotionCNC application.  Are you doing all that fuctionality?
 
Regards
TK